Title: Replication Package for "How the Pro-Beijing Media Influences Voters: Evidence from a Randomized Field Experiment"
Author: Jay C. Kao
Journal: American Political Science Review
Date: December 9, 2025


A. OVERVIEW

This replication package contains the datasets, Stata code, and R code required to reproduce all tables and figures presented in the main text and Supplementary Material of the manuscript.

The workflow consists of two stages:

	Data Cleaning (Stata): Processes raw survey data into the final analysis file.

	Analysis (R): Generates all tables and figures using the processed data.

The analysis was originally conducted using R version 4.5.1 on Windows 11 x64.



B. DIRECTORY STRUCTURE

The package is organized as follows:

[Root Directory] : Contains all execution scripts.

	00_clean.do      (Stata cleaning script)

	00_master.R      (R master execution script)

	01_make.tables.R (R table generation script)

	02_figures.R     (R figure generation script)

Data/            : Subfolder with input datasets (.csv) and the final output (.dta).

Tables/          : Subfolder where generated .tex tables will be saved.

Figures/         : Subfolder where generated .pdf figures will be saved.




C. INSTRUCTIONS FOR REPLICATION

To replicate the findings from scratch, please follow these two stages in order.

STAGE 1: Data Cleaning (Stata)

  1. Open 00_clean.do in Stata.

  2. Important: Change the working directory at the top of the script to the location of this unzipped folder 

	(Example: cd "C:/Users/Name/Desktop/Replication_Package")

  3. Run the script.

	- This process reads the raw .csv files from the Data subfolder.

    	- It produces Data/analysis.dta, which is required for Stage 2.

	- It automatically removes intermediate temporary files.


STAGE 2: Analysis (R)

  1. Open 00_master.R in RStudio.

  2. Run the entire script.

	- The script automatically installs required packages (including non-CRAN packages).

	- It detects the working directory automatically (if using RStudio).

	- It creates Tables/ and Figures/ subfolders if they do not exist.

	- It runs 01_make.tables.R and 02_figures.R in the correct order.

Note: If you wish to skip data cleaning, a pre-generated Data/analysis.dta is included in this package. You may proceed directly to Stage 2.





D. FILE DESCRIPTIONS

Root Directory (Documentation & Scripts)

- README.txt
  The starting point for replication. Contains overview, instructions, and file manifest.

- Codebook.pdf
  Contains variable definitions and coding schemes for the panel survey data.

- SurveyInstruments.pdf
  Presents original wording (translated) on questions asked in the panel survey.

- 00_clean.do (Stata)
  Pre-processing script for the final analysis.dta.

- 00_master.R (R)
  The primary execution file for analysis. Sets up the R environment and orchestrates the table and figure generation.

- 01_make.tables.R (R)
  Generates Table 1 and Table 2 (Main Text) and Tables SI-1 through SI-13 (Supplementary Material). Saves outputs to Tables/.

- 02_make.figures.R (R)
  Generates Figure 3 through Figure 6 (Main Text) and Figures SI-2 through SI-22 (Supplementary Material). Saves outputs to Figures/.



Data Subfolder (Data/)

- baseline_cleaned.csv
  Raw data from the Wave 1 (Baseline) survey.
  (Note: Random assignment was conducted offline following the completion of the baseline survey. The specific random seed used for this batch assignment 
   was not preserved. Therefore, "conditions" serves as the definitive, static record of experimental conditions. The analysis scripts load this assignment directly rather than re-generating it)

- endline_cleaned.csv
  Raw data from the Wave 2 (Endline) survey.

- tracking_cleaned.csv
  User web browsing/tracking data used to measure compliance.

- analysis.dta
  The final, merged, and cleaned dataset used for all analysis (generated by 00_clean.do).

- ctnews.csv
  Contains headlines and full text of the treatment news articles
    
- Sentiment Dictionaries (for Figure SI-2)
  sentiment_positive.txt: List of positive sentiment terms.
  sentiment_negative.txt: List of negative sentiment terms.
  sentiment_stopword.txt: List of stopwords excluded from text analysis.

- panelvisiting.csv
  Website browsing pattern data (used for Figure SI-4).

- polling.csv
  Pre-election polling data (used for Figure SI-11).






E. REQUIRED PACKAGES

The master R script will attempt to install these automatically, but for reference, the following packages (with package versions) are used:

	tidyverse (2.0.0) 
	estimatr (1.0.6) 
	haven (2.5.5) 
	stargazer (5.2.3) 
	texreg (1.39.4) 
	interflex (1.2.6)
	cowplot (1.2.0)
	broom (1.0.8)
	patchwork (1.3.1)
	survey (4.4.2)
	remotes (2.5.0)
	dotwhisker (0.8.4)
	lubridate (1.9.4)
	ggeffects (2.3.0)
	jiebaR (0.11)
	panelView (1.1.18)
	remotes (2.5.0)


F. SUMMARY OF TABLES AND FIGURES

- Tables
	Table 1: Summary Statistics, Attrition, and Balance Tests
	Table 2: Browsing Behavior
	Table SI-1: Regression of Baseline Pro-PRC Index on Demographic Characteristics
	Table SI-2: Descriptive Statistics of Outcome Variables
	Table SI-3: Treatment Effects
	Table SI-4: Treatment Effects by Political Attentiveness on Vote Choice
	Table SI-5: Treatment Effects by Political Attentiveness on Candidate Evaluation
	Table SI-6: Treatment Effects by Political Attentiveness on Pro-PRC Index
	Table SI-7: Treatment Effects by Political Predispositions
	Table SI-8: Baseline Vote Intent Among All Participants
	Table SI-9: Baseline Vote Intent Among Participants Completing Both Waves
	Table SI-10: Selective Tolerance of Foreign Intervention
	Table SI-11: Regression of News Consumption on Experimental Conditions
	Table SI-12: Covariate-Adjusted Treatment Effect Estimates
	Table SI-13: Multiple Comparisons

- Figures
	Figure 1: Overview of Experimental Design 			(no replication code)
	Figure 2: Screenshots of Treatment Website 			(no replication code)
	Figure 3: Mean Outcome Scores across Experimental Conditions
	Figure 4: Treatment Effects
	Figure 5: Treatment Effects by Political Attentiveness
	Figure 6: Treatment Effects by Political Predispositions
	Figure SI-1: Translated Daily Reminder 				(no replication code)
	Figure SI-2: Sentiment Analysis of Treatment News
	Figure SI-3: Distribution of Average Browsing Time Per Visit
	Figure SI-4: Panel View of Browsing Pattern across Individual and Date
	Figure SI-5: Predicted Probability of Minimum Compliance
	Figure SI-6: Predicted Probability of Full Compliance
	Figure SI-7: PRC Index Baseline Scores by Political Predispositions
	Figure SI-8: Outcome Baseline Scores by Experimental Conditions
	Figure SI-9: Predicted Endline Survey Participation
	Figure SI-10: Placebo-Control Comparison
	Figure SI-11: Pre-election Polling of the General Election
	Figure SI-12: Treatment Effects on Separate PRC Index Items
	Figure SI-13: Cognitive and Affective Reactions to Treatment Site News
	Figure SI-14: Cognitive and Affective Reactions to Placebo Site News
	Figure SI-15: Treatment-Placebo Comparison
	Figure SI-16: List Experiment
	Figure SI-17: Bounded Treatment Effects
	Figure SI-18: IPW (Inverse Probability Weighting)-Adjusted Treatment Effects 
	Figure SI-19: Distribution of IPW Weights
	Figure SI-20: Treatment Effects on Placebo Candidate
	Figure SI-21: Treatment Effects on Turnout
	Figure SI-22: Exploratory Effect Heterogeneity


